Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • molham bakir 18 posts 38 karma points
    Jul 27, 2013 @ 10:33
    molham bakir
    0

    error in @if (Session["language"] == "English")

    I have put this code

    }

    @if (Session["language"] == "English")

                                                     {

    my content
    }
    else
    {

    But its not functiontiong correctly! when the home page first load it shows the content of else and also in the navigation it shows the content of English! so bascially in else the content shall be in Arabic, and in the navigation it should be English, as a link to the English version. but in my code the navigation showing Arabic ! 

    So there is no connection between the content of home page and the navigation.

    My question is why when the home page first load it loads with the Arabic version? 

    and why it shows in the Navigation a link to change to Arabic if i am already in Arabic version?

     @{

                            if (Session["language"] == "English")

                            {

                                <a id="changelang" href="#">عربي</a>

                            }

                            else

                            {

     

                                <a id="changelang" href="#">English</a>

                            }

                        }

Please Sign in or register to post replies

Write your reply to:

Draft